-- GENERATED SPELL FOR [Cobalt Broodling] --


function spell0_10660(pUnit, Event) --@Drain Mana,Drain--
pUnit:FullCastSpellOnTarget(35332,pUnit:GetRandomPlayer(4))
pUnit:RegisterEvent('Sorts_10660', 5000, 1)
end

function spell1_10660(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10660', 7000, 1)
end

function Sorts_10660(pUnit, Event)
local choix_sorts_10660 = math.random(0, 1)
if choix_sorts_10660 == 0 then
pUnit:RegisterEvent('spell0_10660', 1, 1)
end
if choix_sorts_10660 == 1 then
pUnit:RegisterEvent('spell1_10660', 1, 1)
end
end

function mob10660_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10660', math.random(1500, 3000), 1)
end

function mob10660_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10660_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10660_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10660, 1, 'mob10660_Action')
RegisterUnitEvent(10660, 2, 'mob10660_Leave')
RegisterUnitEvent(10660, 3, 'mob10660_Kill')
RegisterUnitEvent(10660, 4, 'mob10660_Die')
